package com.heima.apis.wemedia;

import com.heima.model.admin.dtos.AdChannelDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia")
public interface IWmChannel {
    @PostMapping("/api/v1/channel/list") //分页查询
    public ResponseResult findAll(@RequestBody AdChannelDto dto);
    @PostMapping("/api/v1/channel/update")
    public ResponseResult updateChannel(@RequestBody WmChannel wmChannel);
    @PostMapping("/api/v1/channel/save")
    public ResponseResult saveChannel(@RequestBody WmChannel wmChannel);
    @GetMapping ("/api/v1/channel/del/{id}")
    public ResponseResult deleteChannel(@PathVariable("id") Integer id);

    //文章审核查询
    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult listVo(@RequestBody NewsAuthDto dto);
    //w文章详情
    @GetMapping("/api/v1/news/one_vo/{id}")
    public ResponseResult OneVOById(@PathVariable("id") Long id);

    //审核失败
    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto);

    //审核通过
    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto);
//=======

    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody SensitiveDto dto);
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult delete(@PathVariable("id") Integer id);
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive);
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive);
    @PostMapping("/api/insertwmuser")
    public ResponseResult insertwmuser(@RequestBody WmUser wmUser);


}
